#include "metrics/utility/GaugeMetricsBuilder.hpp"

namespace metrics
{
    GaugeMetricsBuilder::GaugeMetricsBuilder()
    {
    }

    GaugeMetricsBuilder::GaugeMetricsBuilder(const std::string &name, const std::string &help, const std::map<std::string, std::string> &labels)
        : Builder<Gauge>(name, help, labels) {}

    GaugeMetricsBuilder::~GaugeMetricsBuilder()
    {
    }

    GaugeMetricsBuilder &GaugeMetricsBuilder::name(const std::string &name)
    {
        _name = name;
        return *this;
    }

    GaugeMetricsBuilder &GaugeMetricsBuilder::help(const std::string &help)
    {
        _name = help;
        return *this;
    }

    GaugeMetricsBuilder &GaugeMetricsBuilder::labels(const std::map<std::string, std::string> &labels)
    {
        _labels = labels;
        return *this;
    }

    std::shared_ptr<Family<Gauge>> GaugeMetricsBuilder::metric_register(std::shared_ptr<MetricRegistry> registry)
    {
        return registry->add<Gauge>(_name, _help, _labels);
    }
} // namespace metrics